using UnityEngine;
using System.Collections;

public class HospitalControl : MonoBehaviour {
	
	    public float LIFE = 300f;
		public GameObject gameover;
		public GameObject hudVida;
	// Use this for initialization
	void Start () {
	
	}
	
	public void RecibirDmg(float dmg)
	{
        LIFE = LIFE - dmg;
		hudVida.GetComponent<ControlVidaHospital>().actualizarVida(LIFE);
        Debug.Log("------Chuchpital_life_left: " + LIFE);
        if (LIFE <= 0)
        {
			gameover.GetComponent<PlayerControl>().Morir();
			
        }
	}
	// Update is called once per frame
	void Update () {
	}
}
